//
//  WeakWebViewScriptMessageDelegate.m
//  app端如何和H5交互
//
//  Created by clz on 2019/10/16.
//  Copyright © 2019 clz. All rights reserved.
//

#import "WeakWebViewScriptMessageDelegate.h"

@implementation WeakWebViewScriptMessageDelegate

- (instancetype)initWithDelegate:(id)delegate{
    self = [super init];
    if (self) {
        self.delegate = delegate;
    }
    return self;
}

#pragma mark-WKScriptMessageHandler
- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message{
    if (self.delegate) {
        [self.delegate userContentController:userContentController didReceiveScriptMessage:message];
    }
}



@end
